﻿<MDCard Class="info-card-project pa-4" Href="@($"/project/{Model.Id}")">
    <div class="title-large">@Model.Name</div>
    <div class="label-large text-truncate-3">@Model.Description</div>
    <div class="info-card">

        @if (Model.UserInfo != null)
        {
            <div class="user-card">
                <CnGalWebSite.Components.Images.MasaImage Src="@Model.UserInfo.Avatar" Alt="@Model.UserInfo.Name" />
                <div class="label-large fw-bold">@Model.UserInfo.Name</div>
            </div>
        }

        @if (Model.Percentage > 0)
        {
            <div class="title-large primary-text">@($"{Model.Percentage} %")</div>
        }

        @if (Model.BudgetMax > 0)
        {
            <div class="title-large primary-text">@($"￥ {Model.BudgetMin} ~ {Model.BudgetMax}")</div>
        }

        @if (Model.BudgetMax == 0 && Model.Percentage == 0)
        {
            if(Model.PositionCount==0)
            {
                <div class="title-large primary-text">暂无约稿</div>
            }
            else
            {
                <div class="title-large primary-text">为爱发电</div>
            }
            
        }
    </div>
</MDCard>

@code {
    [Parameter]
    public ProjectInfoViewModel Model { get; set; }
}
